var deviceFaultCountChartOption = {
    color: ['#006699'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '发生故障次数最多的设备',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            // dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        axisLabel:{  interval: 0,rotate:45},
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障次数',
        type: 'bar',
        barWidth: '70%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var deviceFaultSumTimeChartOption = {
    color: ['#e5323e'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '发生故障时间最长的设备',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            // dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        axisLabel:{  interval: 0,rotate:45},
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障时长',
        type: 'bar',
        barWidth: '70%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var damagePartChartOption = {
    color: ['#FF8000'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '发生故障次数最多的部位',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            // dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '发生故障部位次数最多的部位',
        type: 'bar',
        barWidth: '40%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var devicePartChangeComponentChartOption = {
    color: ['#548C00'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '更换零件次数最多的部位',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '更换零件次数最多的部位',
        type: 'bar',
        barWidth: '40%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var damageComponentChartOption = {
    color: ['#C73C6C'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '更换次数最多的配件',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            // dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        axisLabel:{  interval: 0,rotate:45},
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '更换次数最多的配件',
        type: 'bar',
        barWidth: '70%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var deviceOverTwoCountChartOption = {
    color: ['#00BFFF'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '故障超过两小时次数的设备',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            // dataView: {},
            restore: {},
            magicType: {
                type: ['line', 'bar']
            },
            saveAsImage: {},
        }
    },
    xAxis: {
        type: 'category',
        axisLabel:{  interval: 0,rotate:45},
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障超过两小时次数的设备',
        type: 'bar',
        barWidth: '70%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};


var lineFaultCountChartOption = {
    color: ['#006699'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '本月发生故障次数最多的设备',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',

        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障次数',
        type: 'bar',
        barWidth: '40%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var lineOverHourCountChartOption = {
    color: ['#C73C6C'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '本月故障时间超2小时故障次数',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障次数',
        type: 'bar',
        barWidth: '40%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};

var lineTotalTImeChartOption = {
    color: ['#FF8000'],
    tooltip: {
        trigger: 'item'
    },
    title: {
        text: '本月总故障时间最长',
        x: 'center'
    },
    toolbox: {
        show: true,
        feature: {
            saveAsImage: {}
        }
    },
    xAxis: {
        type: 'category',
        data: []
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        name: '故障时长',
        type: 'bar',
        barWidth: '40%',
        itemStyle: {
            normal: {
                label: {
                    show: true, //开启显示
                    position: 'top', //在上方显示
                }
            }
        },
        data: []
    }]
};